package com.wonders.qxmanager.service.impl;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wonders.qxmanager.base.Parameter;
import com.wonders.qxmanager.base.WidgetPage;
import com.wonders.qxmanager.dao.LogDao;
import com.wonders.qxmanager.model.Log;
import com.wonders.qxmanager.service.LogService;
import com.wonders.qxmanager.utils.PageArrayList;

@Service
@Transactional
public class LogServiceImpl implements LogService {

	@Autowired
	private LogDao logDao;

	@Override
	public void addLog(Log log) {
		logDao.addLog(log);
		
	}

	@Override
	public void deleteLog(Integer id) {
		logDao.deleteById(id);
		
	}

	@Override
	public int updateLog(String qlString, Parameter parameter) {
		return logDao.update(qlString, parameter);
	}

	@Override
	public Log getLogByHQL(String hqlString, Parameter parameter) {
		return logDao.getByHQL(hqlString, parameter);
	}

	@Override
	public PageArrayList<Log> getListByPage(Log log, WidgetPage page) {
		
		return logDao.getListByPage(log, page);
	}

	@Override
	public List<Log> getAll() {
		return logDao.getAll();
	}

	@Override
	public Log getLogById(Integer id) {
		return logDao.getLogById(id);
	}

	@Override
	public List<Log> getListByHQL(String sqlString, Parameter parameter) {
		return logDao.getListByHQL(sqlString, parameter);
	}
	

}
